Skip to content

Conversation

@rickgaiser
Copy link
Member

@freshollie can you try this?

Untested but should work. @fjtrujy what do you think? Can be added for non-HIRES as well.

@freshollie
Copy link
Contributor

I'll have a go this weekend :)

I'll also use this time to determine if changing the line order for 1080i helps my TV 🤔

@freshollie
Copy link
Contributor

Yep works great, having this in would be really nice!

static void gfx_ps2_swap_buffers_end(void) {
    /* How SM64 expect to run at 30 PFS we need to wait for 2 vsync */
    if (use_hires) {
        gsKit_hires_flip_ext(gs_global, GSFLIP_RATE_LIMIT_2);
    } else {
        gsKit_sync(gs_global);
        gsKit_flip(gs_global);
    }

    gsKit_queue_exec(gs_global);
    gsKit_TexManager_nextFrame(gs_global);
}

I used it like this which I think is correct?

No FPS issues in levels now I have this on

@rickgaiser
Copy link
Member Author

You need to use gsKit_queue_exec(gs_global); for non-hires ONLY. With HIRES the queue is executed by the HIRES thread 120x per second for 2 passes what you're using now.

What you're doing causes 1 redundant 'pass', so removing it will make the game run a little smoother.

@freshollie
Copy link
Contributor

Done. Though it did run fine without it

@freshollie
Copy link
Contributor

freshollie commented Jan 26, 2026

@rickgaiser I think also adding for SD will be a good idea, but otherwise good to merge IMO

@rickgaiser
Copy link
Member Author

Yes, I've already implemented that partially. Will try to finish when I have time.

@rickgaiser rickgaiser marked this pull request as ready for review January 27, 2026 19:08
@rickgaiser
Copy link
Member Author

What I would like is a complete integration of hires/non-hires. Then instead of gsKit_hires_flip_ext have only gsKit_flip_ext that works for all modes. But this requires using the vsync interrupt in gsKit internally when not using hires, instead of allowing applications to register the vsync interrupt. Making this a breaking change.

There's more functions from hires that can be removed in the same way. That would also simplify applications no longer needing the if/else in a few places for SD/HD.

I tried to do this but it's taking me too much time so please review this PR as-is and leave the above as a note for those interested to tackle this issue.

@freshollie
Copy link
Contributor

Makes sense. Though I think to make this non breaking couldn't this be a different function you call for handling on both modes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants